package com.yx.changdao.common.enums;

/**
 * @Description: 评分枚举
 *
 * @Auther: zcz
 * @create 2020/5/8
 */
public enum ScoreEnum {

    NO(0,"未评价"),
    SATISFIED(1,"满意"),
    BASICALLY_SATISFIED(2,"基本满意"),
    DISSATISFIED(3,"不满意");


    private Integer status;
    private String info;
    private ScoreEnum(Integer status, String info){
        this.status=status;
        this.info=info;
    }

    public static ScoreEnum info(Integer status) {
        if (status.equals(1)) {
            return SATISFIED;
        } else if (status.equals(2)) {
            return BASICALLY_SATISFIED;
        } else if (status.equals(3)) {
            return DISSATISFIED;
        } else {
            return null;
        }
    }

    public String info(){
        return this.info;
    }
    public Integer status(){
        return this.status;
    }

    public static String result(Integer type){
        for (ScoreEnum value : ScoreEnum.values()) {
            if(value.status.equals(type)){
                return value.info;
            }
        }
        return "";
    }
}
